<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
  xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">

<head>
  <title layout:title-pattern="$CONTENT_TITLE | $LAYOUT_TITLE" th:text="${applicationTitle}">Supplier Chain Management System</title>

  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport" />
  <meta name="description" content="" />
  <!-- TODO: Add description -->
  <meta name="author" content="" />
  <!-- TODO: Add author -->

  <!-- Favicon -->
  <link rel="shortcut icon" th:href="@{|${theme}/favicon.ico|}" />
  <!-- TODO: Add favicon -->

  <!-- Stylesheets -->
  <link th:href="@{|${theme}/css/bootstrap.min.css|}" href="themes/inspinia/css/bootstrap.min.css" rel="stylesheet" />
  <link th:href="@{|${theme}/font-awesome/css/font-awesome.min.css|}" href="themes/inspinia/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
  <link th:href="@{|${theme}/css/animate.min.css|}" href="themes/inspinia/css/animate.min.css" rel="stylesheet" />
  <link th:href="@{|${theme}/css/plugins/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css|}" href="/themes/inspinia/css/plugins/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css" rel="stylesheet" />
  <link rel="stylesheet" th:href="@{|${theme}/css/plugins/datatables/datatables.min.css|}" href="//cdn.bootcss.com/datatables/1.10.11/css/dataTables.bootstrap.min.css" />
  <link rel="stylesheet" th:href="@{|${theme}/plugins/datatables/extensions/Buttons/css/buttons.bootstrap.min.css|}" href="themes/inspinia/plugins/datatables/extensions/Buttons/css/buttons.bootstrap.min.css" />
  <link rel="stylesheet" th:href="@{|${theme}/css/plugins/select2/select2.min.css|}" href="/themes/inspinia/css/plugins/select2/select2.min.css" />
  <link rel="stylesheet" th:href="@{|${theme}/css/plugins/select2/select2-bootstrap.min.css|}" href="/themes/inspinia/css/plugins/select2/select2-bootstrap.min.css" />
  <link rel="stylesheet" th:href="@{|${theme}/css/plugins/toastr/toastr.min.css|}" href="/themes/inspinia/css/plugins/toastr/toastr.min.css" />
  <link rel="stylesheet" th:href="@{|${theme}/css/plugins/ladda/ladda-themeless.min.css|}" />
  <link rel="stylesheet" th:href="@{|${theme}/css/plugins/summernote/summernote.css|}" />
  <link rel="stylesheet" th:href="@{|${theme}/css/plugins/daterangepicker/daterangepicker-bs3.css?|}" />
  <link rel="stylesheet" th:href="@{|${theme}/css/plugins/datetimepicker/bootstrap-datetimepicker.min.css|}" />
  <link rel="stylesheet" th:href="@{|${theme}/css/custom.css|}" />
  <link th:href="@{|${theme}/css/style.min.css|}" href="themes/inspinia/css/style.min.css" rel="stylesheet" />
  <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]>
		<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
		<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
     <![endif]-->
  <style>
    .search-form .form-group {
      margin-bottom: 0
    }
    .row .form-group {
      margin-top: 0.1px;
      margin-bottom: 0.1px;
    }
    .line .form-group {
      margin-top: 5px;
      margin-bottom: 5px;
    }

    .btn {
      font-size: 12px;
    }

    .dt-buttons {
      margin-left: 10px;
    }

    label.control-label {
      white-space: nowrap;
    }

    label.control-label:after {
      content: ':'
    }

    label.required:before {
      content: '* ';
      color: red;
      line-height: 20px;
    }

  </style>
    <style>
      .table-hover > tbody > tr:hover {
        background-color: #d9edf7 !important;
      }


    .table-bordered>thead>tr>td,.table-bordered>thead>tr>th {
      background-color: #9ad5f3 !important;
    }

  .table-fixed {
    table-layout: fixed;
  }
      .table-fixed > tbody > tr > td {
        word-break: break-all;
      }
  </style>
  <script th:inline="javascript">
    var static = /*[[@{${static}}]]*/ '';
    var theme = /*[[@{${theme}}]]*/ '';
    var rootUrl = /*[[@{/index}]]*/ '';
    rootUrl = rootUrl.replace('/index', '');
    var baseUrl = /*[[@{${baseUrl}}]]*/ '';

  </script>
</head>

<body class="gray-bg">
  <th:block layout:fragment="pageheader">
    <div th:replace="layouts/fragments/pageheader :: pageheader" />
  </th:block>
  <th:block layout:fragment="wrapper-content">
	<div class="wrapper wrapper-content animated fadeIn" id="parentdiv">
	  <!-- Content -->
	  <th:block layout:fragment="content" />
	</div>
  </th:block>
  <!-- JavaScripts -->
  <!-- Mainly scripts -->
  <script th:src="@{|${theme}/js/jquery-2.1.1.js|}" src="/themes/inspinia/js/jquery-2.1.1.js"></script>
  <script th:src="@{|${theme}/js/bootstrap.min.js|}" src="/themes/inspinia/js/bootstrap.min.js"></script>
  <script th:src="@{|${theme}/plugins/metisMenu/jquery.metisMenu.js|}" src="/themes/inspinia/plugins/metisMenu/jquery.metisMenu.js"></script>
  <script th:src="@{|${theme}/plugins/slimscroll/jquery.slimscroll.min.js|}" src="/themes/inspinia/plugins/slimscroll/jquery.slimscroll.min.js"></script>
  <!-- Bootbox -->
  <script th:src="@{|${theme}/plugins/bootbox/bootbox.min.js|}" src="/themes/inspinia/plugins/bootbox/bootbox.min.js"></script>
  <script th:src="@{|${theme}/plugins/toastr/toastr.min.js|}" src="/themes/inspinia/plugins/toastr/toastr.min.js"></script>
  <!-- iCheck -->
  <script th:src="@{|${theme}/plugins/iCheck/icheck.min.js|}" src="/themes/inspinia//plugins/iCheck/icheck.min.js"></script>
  <!-- Select2 -->
  <script th:src="@{|${theme}/plugins/select2/select2.full.js|}" src="/themes/inspinia/plugins/select2/select2.full.js"></script>
  <script th:src="@{|${theme}/plugins/select2/zh-CN.js|}" src="/themes/inspinia/plugins/select2/zh-CN.js"></script>
  <script th:src="@{|${theme}/plugins/pace/pace.min.js|}" src="/themes/inspinia/plugins/pace/pace.min.js"></script>
  <!-- Ladda -->
  <script th:src="@{|${theme}/plugins/ladda/spin.min.js|}" src="/themes/inspinia/plugins/ladda/spin.min.js"></script>
  <script th:src="@{|${theme}/plugins/ladda/ladda.min.js|}" src="/themes/inspinia/plugins/ladda/ladda.min.js"></script>
  <script th:src="@{|${theme}/plugins/ladda/ladda.jquery.min.js|}" src="/themes/inspinia/plugins/ladda/ladda.jquery.min.js"></script>
  <script th:src="@{|${theme}/js/jquery.deserialize.min.js|}" src="/themes/inspinia/js/jquery.deserialize.min.js"></script>
  <!-- Custom and plugin javascript -->
  <th:block th:switch="${applicationEnvironment}">
    <th:block th:case="'prod'">
      <!-- Application -->
      <script th:src="@{|${theme}/js/inspinia.min.js?v=${applicationVersion}|}" src="/themes/inspinia/js/inspinia.min.js"></script>
      <script th:replace="layouts/fragments/datatablesjs :: datatables" />
      <script th:src="@{|${theme}/js/extras.min.js?v=${applicationVersion}|}" src="/themes/inspinia/js/extras.min.js"></script>
      <script th:src="@{|${theme}/js/app.min.js?v=${applicationVersion}|}" src="/themes/inspinia/js/app.min.js"></script>
    </th:block>
    <th:block th:case="*">
      <script th:src="@{|${theme}/js/inspinia.min.js?v=${applicationVersion}|}" src="/themes/inspinia/js/inspinia.min.js"></script>
      <script th:replace="layouts/fragments/datatablesjs :: datatables" />
      <script th:src="@{|${theme}/js/extras.min.js?v=${applicationVersion}|}" src="/themes/inspinia/js/extras.min.js"></script>
      <script th:src="@{|${theme}/js/app.min.js?v=${applicationVersion}|}" src="/themes/inspinia/js/app.min.js"></script>
    </th:block>
  </th:block>
  <script type="text/javascript" th:inline="javascript">
    var info = /*[[${info}]]*/ "";
    var error = /*[[${error}]]*/ "";
    var success = /*[[${success}]]*/ "";
    var warning = /*[[${warning}]]*/ "";
    $(function () {
      var token = /*[[${_csrf.token}]]*/ '';
      var header = /*[[${_csrf.headerName}]]*/ '';
      $(document).ajaxSend(function (e, xhr, options) {
        xhr.setRequestHeader(header, token);
      }).ajaxError(function( event, jqxhr, settings, thrownError ) {
   	    console.log(event, jqxhr, settings, thrownError);
    		//toastr.error(thrownError, '访问服务器异常', {timeOut: 0});
      });
    });

  </script>
  <!-- Page JavaScripts -->
  <th:block layout:fragment="scripts" />
</body>

</html>
